﻿{% extends 'task_market/base.html' %}
{% load static %}


{% block title %}
    注册
{% endblock %}

{% block content %}

    <div class="breadcrumbs">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="bread-inner">
                        <ul class="bread-list">
                            <li><a href="{% url 'task_market:index' %}" target="_blank">主页<i class="ti-arrow-right"></i></a></li>
                            <li class="active"><a href="#">注册</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <section class="shop login section">
        <div class="container">
            <div class="row">
                <div class="col-lg-5 mx-auto">
                    <div class="login-form">
                        <h2>创建新账户</h2>
                        <p>Please fill all forms to continued</p>

                        <form class="form" method="post" action="">
                            {% csrf_token %}
                            <div class="row">
                                <div class="col-12">
                                    <div class="form-group">
                                        <label>Account<span>*</span></label>
                                        <input type="text" name="account" placeholder="请输入账号" required="required">
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-group">
                                        <label>Name<span>*</span></label>
                                        <input type="text" name="name" placeholder="请输入昵称" required="required">
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-group">
                                        <label>Type<span>*</span></label>
                                        <div>
                                            <select name="type" class="form-group">
                                                <option selected="selected">请选择</option>
                                                <option value="0">管理员</option>
                                                <option value="1">数据标注者</option>
                                                <option value="2">任务发布者</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>


                                <div class="col-12">
                                    <div class="form-group">
                                        <label>Password<span>*</span></label>
                                        <input type="password" name="pwd" placeholder="请输入密码" required="required">
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-check">
                                        <input class="form-check-input" type="checkbox" value="" id="agree">
                                        <label class="form-check-label" for="agree">
                                            I agree with the <a href="https://www.bilibili.com/protocal/licence.html" class="text-success">Terms & Conditions.</a>
                                        </label>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-group login-btn">
                                        <button class="btn" type="submit">创建账户</button>
                                    </div>
                                </div>
                                <p>已有帐户? <a href="{% url 'task_market:user_mng:login' %}">登录</a>
                                </p>
                            </div>
                            <div class="col-12">
                                <div class="form-group">
                                    <div style="color: red; text-align: center;">{{ error_msg }}</div>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </section>

{% endblock %}